home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20000824-20010305
/
000351_news@columbia.edu _Fri Feb 23 11:16:29 2001.msg
< prev
next >
Wrap
Internet Message Format
|
2001-03-05
|
4KB
Return-Path: <news@columbia.edu>
Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
by uhaligani.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id LAA21781
for <kermit.misc@cpunix.cc.columbia.edu>; Fri, 23 Feb 2001 11:16:29 -0500 (EST)
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id LAA03293
for <kermit.misc@watsun.cc.columbia.edu>; Fri, 23 Feb 2001 11:16:28 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id LAA15323
for kermit.misc@watsun.cc.columbia.edu; Fri, 23 Feb 2001 11:00:35 -0500 (EST)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: fdc@columbia.edu (Frank da Cruz)
Subject: Re: Help needed on writing scripts to transfer files by FTP
Date: 23 Feb 2001 16:00:34 GMT
Organization: Columbia University
Message-ID: <9761f2$eup$1@newsmaster.cc.columbia.edu>
To: kermit.misc@columbia.edu
In article <3A9647C3.473C192E@ssynth.co.uk>,
Andrew Gay <andrew@ssynth.co.uk> wrote:
: Tien Nguyen wrote:
: >
: > #!/bin/sh
: >
: > ftp <<EOF
: > open 172.16.10.10
: > user abc cde
: > bin
: > get file1
: > quit
: > EOF
: >
:
: I am surprised by the number of incorrect responses to this, and people
: posting so-called 'solutions' thay haven't actually tried.
:
: Tien's suggestion above will not work. ftp will still prompt for a username
: and password (unless the account doesn't require one).
:
: The 'correct' solution is to create a file .netrc in the user's home
: directory. See man netrc for details.
:
There is a new correct response: a fully scriptable FTP client from the
Kermit Project at Columbia University. Not only is it scriptable but it
does all the other things that everybody has been asking for all these
years:
. Security
. Recursion (directory-tree traversal)
. Character-set translation
. Atomic file movement
. Automatic text/binary mode switching
. Flexible file selection
. Preservation of dates and permissions
. Update and recovery modes
. Filename collision options
The command language can be used interactively (like a regular FTP client),
in which case it is much friendlier than what you are used to: it gives
help, it offers filename and keyword completion, and so forth. The same
command language can be used to write automated procedures, and it offers
the programming features you need:
. User-defined and built-in variables and arrays.
. User-defined and built-in functions.
. Block structure, scoping.
. Pattern matching.
. Decision making (nestable IF-ELSE, SWITCH)
. Looping (FOR, WHILE)
. Associative arrays
. Integer and floating-point arithmetic
And on and on. The new FTP client is built in to C-Kermit 7.1, and is
available for all varieties of UNIX: Solaris, Linux, AIX, IRIX, HP-UX,
and all the rest. You can find it here:
http://www.columbia.edu/kermit/ftpclient.html
You can find a scripting tutorial here to help you get started:
http://www.columbia.edu/kermit/ftpscript.html
And you can find complete documentation here:
http://www.columbia.edu/kermit/ckermit3.html#x3
If you have questions, you can post them to:
news:comp.protocols.kermit.misc
or send them by email to:
kermit-support@columbia.edu
Give it a try -- it does all the things that people have been asking
for all these years on the newsgroups.
- Frank